import { PurchaseQrcodeconfigComponent } from './QRCodeConfig/purchase-qrcodeconfig/purchase-qrcodeconfig.component';
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { SystemsetComponent } from './systemset.component';
import { EncodingRulesComponent } from './encoding-rules/encoding-rules.component';
import { EditEncodeingRulesComponent } from './edit-encodeing-rules/edit-encodeing-rules.component';
import { AddEncodingRuleComponent } from './add-encoding-rule/add-encoding-rule.component';
import { DirctoryComponent } from './dirctory/dirctory.component';
import { ReviewFlowRolesComponent } from './review-flow-roles/review-flow-roles.component';
import { ReviewFlowComponent } from './review-flow-roles/review-flow/review-flow.component';
import { ReviewFlowNodeComponent } from './review-flow-roles/review-flow/review-flow-node/review-flow-node.component';
import { FlowNodeComponent } from 'src/app/@shared/components/flow-node/flow-node.component';
import { CanActivateGuard } from 'src/app/@core/services/can-load-service.guard';

const routes: Routes = [
  {
   path: '',
   component: SystemsetComponent,
   children:[
    {
      path:"Encoding-Rules",
      component:EncodingRulesComponent,
      canActivate: [CanActivateGuard]
    },{
      path:"AddEncoding-Rules",
      component:AddEncodingRuleComponent,
      // canActivate: [CanActivateGuard]
    },{
      path:"Edit-Encoding-Rules/:id",
      component:EditEncodeingRulesComponent,
      canActivate: [CanActivateGuard]
    },{
      path:"Dirctory",
      component:DirctoryComponent,
      canActivate: [CanActivateGuard]
    },
    {
      path:"Review-Flow-Roles",
      component:ReviewFlowRolesComponent,
      canActivate: [CanActivateGuard]
    },
    {
      path:"Review-Flow",
      component:ReviewFlowComponent,
      canActivate: [CanActivateGuard]
    },{
      path:"Review-Flow-Node/:id",
      component:ReviewFlowNodeComponent,
      canActivate: [CanActivateGuard]
    },{
      path:"Node",
      component:FlowNodeComponent,
      canActivate: [CanActivateGuard]
    },
    {
      path:'purchaser-qrcodeconfig',
      component:PurchaseQrcodeconfigComponent
    }
   ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class SystemsetRoutingModule { }
